Solving quadratic equations with continued fractions